"""
@name : lianxi-user-check
@author : wenyao
@projectname: sanchuanglianxi
"""
#######
dict1 = {'root':'123456','admin':'admin'}

while True:
    flag_1 = 0
    user_name = input("请输入用户名")
    #当用户输入"quit"时退出程序
    if user_name == 'quit':
        break
    else:
        for x,y in dict1.items():
            if user_name == x:
                user_passwd = input("请输入密码")
                flag_1 = 1
                if user_passwd == y:
                    print("恭喜你登陆成功")
                else:
                    print("抱歉你的密码错误")
    if flag_1 == 0:
        print("无此用户名")

#################################################
Ulist = {'root':'123456', 'admin':'admin'}
print("欢迎使用用户检测系统")
for i in range(1,999999):
    name = input("(可输入quit以退出程序)\n请输入用户名:")
    if name in Ulist.keys():
        pwd = input("请输入密码：")
        if pwd == Ulist[name]:
            print("验证成功，欢迎登录！")
        else:
            print("验证失败，请重新输入")
    elif name == 'quit':
        break
    else:
        print("没有这个用户，请重新输入")